

/*********************************************************/

function PhoneListCtrl($scope,$http) {
      //githubService();

      $scope.person={name:'',age:0};
    
      $scope.$watch('person.age',function(newVal,oldVal) {
            if(newVal){
              alert(newVal+"---"+oldVal);
            }
      });



    $scope.say=function() {
      $scope.person.age="good";





      // $http.get('http://www.baidu.com').success(function() {
      //   alert(1);
      // }).error(function() {
      //   alert(2);
      // });
      alert($scope.person.age);
    };


};



function DivCtrl($scope,$http) {
    

    var updateClock=function() {
       $scope.time=new Date();
    };

     setInterval(function(){
       $scope.$apply(updateClock);
     },1000);


    $scope.test=function() {
       $scope.person.age="fb";
    };

    updateClock();
};

 

 